C (11/254)

From:Martin McKenzie
Date:26 Apr 00 at 22:19:54
Subject:Re: AllocBitmap

Hello Allan,

On 25-Apr-00, Allan Odgaard wrote:
> Without having seen the sources for CGX (nor used it for that matter ;-) )
> I'd say that a bitmap is always allocated in graphics memory.

not for CGX Im afraid...
I did a quick search through old archives of the cybergraphics ML and found
this: (the topic was the slow speed of swapping OS menus under CGX)

"With P96, these buffer bitmaps are placed in gfxcard ram if
possible, and the swapping can then be done by the blitter. CGX also
supports bitmaps in gfxcard ram, but AFAIK Frank chose to require
the BMF_DISPLAYABLE flag to be set for this to happen"

Frank then replied, agreeing that this flag must be set if you want to
allocate your data in the gfx board ram.

[...]
> But a logo or similar, which is just used as source for blitting, only
> makes things a little slower to have in fast ram, and should naturally
> be moved when memory is low.

For most uses, having the data in fast ram is perfectly acceptable, but
sometimes it is best to have the data in on-board gfx ram.
For example, the recent talk about a tile-map scroller would benefit here; A
lot of the tiles could be located within the on-board ram, and blitted to
the display at a much faster rate.

While doing the seach through the mailing list, I also stumbled over this
interesting info:
Someone did a speed test, to find out the time difference between blitting
from fast ram/gfx ram sources.

"Here are the results of a test I did on my CyberVision 64/3d:
The source bitmap for all tests was 64 pixels wide, and 64 pixels
heigh. It's depth matched the depth of the tested screen mode, as did
the pixel format (eg friend bitmap). The bitmap was blited to an
intuition screen 16384 times. The destination x and y coordinates were
increased after each blit.

Screen Mode: 320*240*16-Bit
..Source BitMap stored in FAST RAM: 52.3 seconds.
..Source BitMap stored in VIDEO RAM: 3.08 seconds.

Screen Mode: 320*240*24-bit
..Source BitMap stored in FAST RAM: 1 minute 13 seconds.
..Source BitMap stored in VIDEO RAM: 6.67 seconds. "

so, if (for example) a tile-mapped based game was being written, then it
would make sense to store the tile data in gfx board ram where possible.

>From what you say P96 handles all this transparently, but this added tag
must be used under CGX.



Cheerio,
Martin McKenzie
Imagine support: http://www.cadtech.demon.co.uk/

------------------------------------------------------------------------
Double your manufacturer's warranty on all computers,
home appliances, and electronics AND win up to $500
towards your purchase!
http://click.egroups.com/1/3749/1/_/451227/_/956780932/
------------------------------------------------------------------------